package com.sc.nft.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class TradingPoolCalculatePriceRatioRangeVO {

    @ApiModelProperty("最小价格")
    private String minPrice;

    @ApiModelProperty("最大价格")
    private String maxPrice;

    @ApiModelProperty("当前价格")
    private String  price;

    public void setPrice(BigDecimal price) {
        this.price = price.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setMinPrice(BigDecimal minPrice) {
        this.minPrice = minPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setMaxPrice(BigDecimal maxPrice) {
        this.maxPrice = maxPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
